Repository navigation
Conversation
…ccessors `_extractAsBigDecimal()` returns `null` for NaN and infinities, which `asDecimalOpt()` passed to `Optional.of()` (NPE) and `asDecimal()` / `asDecimal(defaultValue)` returned. Return `Optional.empty()`, the default value, and a NaN conversion failure, as `NumericFPNode` does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code Review ✅ Approved 🟡 Medium riskChanging POJONode decimal accessors for NaN and infinities alters caller-visible results; callers may get empty, fallback, or a conversion exception instead of null/NPE. Fixes VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Fixes #6469.
For a
POJONodewrapping NaN or an infinity,_extractAsBigDecimal()returnsnull;asDecimalOpt()passed it toOptional.of()and threwNullPointerException, andasDecimal()/asDecimal(defaultValue)returnednull. They now behave likeNumericFPNodefor NaN:Optional.empty(), the default value, and_reportBigDecimalConversionNaNFail("asDecimal()").Adds
POJONodeTest.testDecimalAccessorsForNonFinite(), which fails without the change. The full 3.x test suite passes; release notes and credits updated.This issue was found by an LLM-Enhanced Static Analysis Engine and verified manually.